import request from '@/utils/request'

export default{

    /**插入课程基本信息
     * 
     * @param {*} courseInfo 课程基本信息
     * @returns 
     */
    save_basic_info(courseInfo){
        return request({
            url:`/eduService/course/saveCourseBasicInfo`,
            method:'post',
            data:courseInfo
        })
    },

    /**修改课程基本信息
     * 
     * @param {*} courseInfo 课程基本信息
     * @returns 
     */
    update_basic_info(courseInfo){
        return request({
            url:`/eduService/course/updateCourseBasicInfo`,
            method:'post',
            data:courseInfo
        })
    },

   /**id 查询课程基本信息
    * 
    * @param {*} id 
    * @returns 
    */
    get_basic_info(id){
        return request({
            url:`/eduService/course/getCourseBasicInfo/${id}`,
            method:'get'
        })
    },

    /**获得课程发布基本信息
     * 
     * @param {*} id 
     * @returns 
     */
    get_course_publish(id){
        return request({
            url:`/eduService/course/getCoursePublishVo/${id}`,
            method:'get'
        })
    },
    /**课程最终发布
     * 
     * @param {*} id 
     * @returns 
     */
    publish_course(id){
        return request({
            url:`/eduService/course/publishCourse/${id}`,
            method:'get'
        })
    },

    /**课程列表 分页 条件
     * 
     * @param {*} current 
     * @param {*} size 
     * @param {*} courseQuery 
     * @returns 
     */
    get_list(current,size,courseQuery){
        return request({
            url:`/eduService/course/pageCourse/${current}/${size}`,
            method:'post',
            data:courseQuery
        })
    },

    /**删除指定id课程
     * 
     * @param {*} id 
     * @returns 
     */
    delete_course(id){
        return request({
            url:`/eduService/course/deleteCourse/${id}`,
            method:'delete'
        })
    }



    


}